package com.tiancheng.trade.payment.feign;

import com.tiancheng.trade.commom.core.data.Result;
import com.tiancheng.trade.commom.web.model.response.SettlementRuleResVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Collection;
import java.util.List;

/**
 * 清分规则接口
 */
@FeignClient(value = "trade-settlement/api/settlementrule")
public interface SettlementRuleService {
    /**
     * 根据交易中台商品编码批量查询清分规则
     *
     * @param productCodes String
     * @return
     */
    @PostMapping("/getRulesByProductCodes")
    Result<List<SettlementRuleResVO>> getRulesByProductCodes(@RequestBody Collection<String> productCodes);

    /**
     * 根据交易中台商品编码批量查询清分规则
     *
     * @param ruleCodes 规则编码集合
     * @return
     */
    @PostMapping("/getRulesByProductCodes")
    Result<List<SettlementRuleResVO>> getRulesByRuleCodes(@RequestBody Collection<String> ruleCodes);

}
